// Programming_Scala/src/ch03/match-deep-script.scala

case class Person( name: String, age: Int )

val alice = new Person( "Alice", 25 )
val bob = new Person( "Bob", 32 )
val charlie = new Person( "Charlie", 32 )

for( person <- List( alice, bob, charlie ) ) {
  person match {
    case Person( "Alice", 25 ) => println( "Hi, Alice!" )
    case Person( "Bob",32 ) => println( "Hi, Bob!" )
    case Person( name, age ) => println( "Who are you, " + age + " year-old person named " + name + "?" )
  }
}
